#ifndef CLASSICAL_RK_HPP
#define CLASSICAL_RK_HPP

#include "ERK.hpp"

class ClassicalRK : public ERK {
public:
  ClassicalRK(int dim, double dt, double t0, double t1) : ERK(dim, dt, t0, t1) {
    m_s = 4;

    if (!initializeSolver())
      std::cerr << "Error in ClassicalRK initialization." << std::endl;
  }

  bool initializeSolver() {
    m_A.resize(4, 4);
    m_b.resize(4);
    m_b << 1.0/6.0, 1.0/3.0, 1.0/3.0, 1.0/6.0;
    
    m_c.resize(4);
    m_c << 0, 0.5, 0.5, 1;
    m_A.setZero();
    m_A(1,0) = 0.5;
    m_A(2,1) = 0.5;
    m_A(3,2) = 1;

    // std::cout << "A: " << m_A << std::endl;
    // std::cout << "b: " << m_b.transpose() << std::endl;
    // std::cout << "c: " << m_c.transpose() << std::endl;
    return true;
  }
};

#endif